﻿<%@ Page Language="C#" MasterPageFile="../MasterPages/StoreMaster.master" AutoEventWireup="true" CodeBehind="ContentItem.aspx.cs" Inherits="Codagenic.Store.Presentation.Web.Pages.ContentItem" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

    <div class="twelve columns omega">

        <h1><%= ContentObject.Title %></h1>

        <p><%= ContentObject.DateCreated.ToString("d MMMM yyyy") %></p>

        <%= ContentObject.Content %>

        <asp:Repeater ID="rpRelatedProducts" runat="server" OnItemDataBound="rpRelatedProducts_ItemDataBound">
            <HeaderTemplate>
                <div class="row">
                    <h4>Related Products</h4>
                    <ul class="product-listing unstyled horizontal clearfix">
            </HeaderTemplate>
            <ItemTemplate>
                <li class="item">
                    <a href="/Store/ProductRedirect.aspx?pid=<%# DataBinder.Eval(Container.DataItem,"Id") %>">
                        <span class="thumb"><asp:Image ID="ctlImage" runat="server" /></span>
                        <span class="title"><%# Eval("DisplayTitle") %></span>
                        <span class="price">
                            <span class="defaultPrice">
                                <asp:Literal ID="ltlDefaultPrice" runat="server"></asp:Literal>
                            </span>
                            <span class="now">
                                <asp:Literal ID="ltlCost" runat="server"></asp:Literal>
                            </span>
                        </span>
                    </a>
                </li>
            </ItemTemplate>
            <FooterTemplate>
                    </ul>
                </div>
            </FooterTemplate>
        </asp:Repeater>

        <asp:Repeater ID="rpRelatedContentItems" runat="server">
            <HeaderTemplate>
                <div class="row">
                    <h4>Related Content</h4>
                    <ul>
            </HeaderTemplate>
            <ItemTemplate>
                    <li><a href="<%# Eval("Link") %>"><%# Eval("Title") %></a></li>
            </ItemTemplate>
            <FooterTemplate>
                    </ul>
                </div>
            </FooterTemplate>
        </asp:Repeater>

        <asp:Repeater ID="rpAssets" runat="server">
            <HeaderTemplate>
                <div class="row">     
                    <h4>Assets</h4>               
                    <ul class="product-listing unstyled horizontal clearfix">
            </HeaderTemplate>
            <ItemTemplate>
                    <li class="item">
                        <img src="<%# Eval("Url") %>?w=217&h=217" alt="<%# Eval("Title") %>">
                    </li>
            </ItemTemplate>
            <FooterTemplate>
                    </ul>
                </div>
            </FooterTemplate>
        </asp:Repeater>

    </div>

</asp:Content>